package org.marketlive.entity.account;

/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

import org.marketlive.entity.IEntity;

import java.util.Date;

/**
 * Represents a personal contact of a customer ({@link ICustomer}). Contains the name,
 * address and other miscellaneous communication information, of a particular person.
 * @see IPerson, IAddress, ICustomer, ICustomerHome, IContactHome
 */
public interface IContact extends IEntity {

    /**
     * Returns a reference to the <code>Customer</code> the contact belongs to.
     *
     * @return ICustomer the contact belongs to
     */
    ICustomer getCustomer();

    /**
     * Sets the linked <code>Customer</code> for the contact.
     *
     * @param customer the contact belongs to
     */
    void setCustomer(ICustomer customer);

    /**
     * Returns the String value of the alias property for the contact.
     *
     * @return alias String value
     */
    String getAlias();

    /**
     * Sets the alias property's String value for the contact.
     *
     * @param alias String value
     */
    void setAlias(String alias);

    /**
     * Returns the String value of the code property for the contact.
     *
     * @return code String value
     */
     String getCode();

    /**
     * Sets the code property's String value for the contact.
     *
     * @param code String value
     */
     void setCode(final String code);

    /**
     * Returns the String value of the phone1 property for the contact.
     *
     * @return phone1 String value
     */
    String getPhone1();

    /**
     * Sets the phone1 property's String value for the contact.
     *
     * @param phone1 String value
     */
    void setPhone1(String phone1);

    /**
     * Returns the String value of the phone2 property for the contact.
     *
     * @return phone2 String value
     */
    String getPhone2();

    /**
     * Sets the phone2 property's String value for the contact.
     *
     * @param phone2 String value
     */
    void setPhone2(String phone2);

    /**
     * Returns the String value of the extension property for the contact.
     *
     * @return extension String value
     */
    String getExtension();

    /**
     * Sets the extension property's String value for the contact.
     *
     * @param extension String value
     */
    void setExtension(String extension);

    /**
     * Returns the String value of the fax property for the contact.
     *
     * @return fax String value
     */
    String getFax();

    /**
     * Sets the fax property's String value for the contact.
     *
     * @param fax String value
     */
    void setFax(String fax);

    /**
     * Returns the String value of the email property for the contact.
     *
     * @return email String value
     */
    String getEmail();

    /**
     * Sets the email property's String value for the contact.
     *
     * @param email String value
     */
    void setEmail(String email);

    /**
     * Returns the String value of the company property for the contact.
     *
     * @return company String value
     */
    String getCompany();

    /**
     * Sets the company property's String value for the contact.
     *
     * @param company String value
     */
    void setCompany(String company);

    /**
     * Returns the boolean value of the primary property for the contact.
     *
     * @return boolean true if the contact is the primary contact, else false
     */
    boolean isPrimary();

    /**
     * Sets the company property's boolean value for the contact.
     *
     * @param primary true if the contact is in the address book, else false
     */
    void setPrimary(boolean primary);

    /**
     * Returns the boolean value of the inAddressBook property for the contact.
     *
     * @return boolean true if the contact is in the address book, else false
     */
    boolean isInAddressBook();

    /**
     * Sets the inAddressBook property's boolean value for the contact.
     *
     * @param inAddressBook true if the contact is in the address book, else false
     */
    void setInAddressBook(boolean inAddressBook);

    /**
     * Returns the boolean value of the deleted property for the contact.
     *
     * @return boolean true if the contact is deleted, else false
     */
    boolean isDeleted();

    /**
     * Sets the deleted property's boolean value for the contact.
     *
     * @param deleted true if the contact is deleted, else false
     */
    void setDeleted(boolean deleted);

    /**
     * Returns the Date value of the dateDeleted property for the contact.
     *
     * @return Date the date the contact was deleted
     */
    Date getDateDeleted();

    /**
     * Sets the dateDeleted property's Date value for the contact.
     *
     * @param dateDeleted the date the contact was deleted
     */
    void setDateDeleted(Date dateDeleted);

    /**
     * Returns a user-friendly identifier for this <code>IContact</code>.
     * It is a descriptive identifier, and is not guaranteed to be unique.
     *
     * @return  String  the name
     */
    String getName();

    /**
     * Sets the name of this <code>IContact</code>.
     * It is a descriptive identifier, not guaranteed to be unique.
     *
     * @param name the name.
     */
    void setName(String name);
}
